package com.ruoyi.hospital.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hospital.mapper.HospitalDepartmentMapper;
import com.ruoyi.hospital.domain.HospitalDepartment;
import com.ruoyi.hospital.service.IHospitalDepartmentService;

/**
 * 医院科室关联Service业务层处理
 * 
 * @author 天天困
 * @date 2025-08-14
 */
@Service
public class HospitalDepartmentServiceImpl implements IHospitalDepartmentService 
{
    @Autowired
    private HospitalDepartmentMapper hospitalDepartmentMapper;

    /**
     * 查询医院科室关联
     * 
     * @param id 医院科室关联主键
     * @return 医院科室关联
     */
    @Override
    public HospitalDepartment selectHospitalDepartmentById(Long id)
    {
        return hospitalDepartmentMapper.selectHospitalDepartmentById(id);
    }

    /**
     * 查询医院科室关联列表
     * 
     * @param hospitalDepartment 医院科室关联
     * @return 医院科室关联
     */
    @Override
    public List<HospitalDepartment> selectHospitalDepartmentList(HospitalDepartment hospitalDepartment)
    {
        return hospitalDepartmentMapper.selectHospitalDepartmentList(hospitalDepartment);
    }

    /**
     * 新增医院科室关联
     * 
     * @param hospitalDepartment 医院科室关联
     * @return 结果
     */
    @Override
    public int insertHospitalDepartment(HospitalDepartment hospitalDepartment)
    {
        return hospitalDepartmentMapper.insertHospitalDepartment(hospitalDepartment);
    }

    /**
     * 修改医院科室关联
     * 
     * @param hospitalDepartment 医院科室关联
     * @return 结果
     */
    @Override
    public int updateHospitalDepartment(HospitalDepartment hospitalDepartment)
    {
        return hospitalDepartmentMapper.updateHospitalDepartment(hospitalDepartment);
    }

    /**
     * 批量删除医院科室关联
     * 
     * @param ids 需要删除的医院科室关联主键
     * @return 结果
     */
    @Override
    public int deleteHospitalDepartmentByIds(Long[] ids)
    {
        return hospitalDepartmentMapper.deleteHospitalDepartmentByIds(ids);
    }

    /**
     * 删除医院科室关联信息
     * 
     * @param id 医院科室关联主键
     * @return 结果
     */
    @Override
    public int deleteHospitalDepartmentById(Long id)
    {
        return hospitalDepartmentMapper.deleteHospitalDepartmentById(id);
    }
}
